package com.ruicar.afs.cloud.batch.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.ruicar.afs.cloud.batch.enums.BatchType;
import com.ruicar.afs.cloud.batch.enums.StepType;
import com.ruicar.afs.cloud.common.core.entity.BaseEntity;
import com.ruicar.afs.cloud.common.core.enums.AfsEnumDeserializer;
import com.ruicar.afs.cloud.common.core.enums.AfsEnumSerializer;
import lombok.Data;

@TableName("afs_batch_job_step_info")
@Data
public class AfsBatchJobStepInfo extends BaseEntity<AfsBatchJobStepInfo> {
    private String systemName ;
    /** 归属批量 */
    private String batchNo ;
    /** 步骤编号 */
    private String stepNo ;
    /** 步骤名称 */
    private String stepName ;
    /** 依赖步骤号 */
    private String dependStep ;
    /** 展示顺序 */
    private Integer showOrder ;
    /** 执行线程数;用几个线程去执行该批量步骤，需代码中结合步骤参数自己区分数据 */
    private Integer threadNum ;
    /** 执行批量类 */
    private String runClass ;
    /** 步骤参数;key=value,格式多个用逗号分割 */
    private String stepParam ;
    /** 步骤类型;D0-每日,WL-周日，MB-月初（每月第一天），ME-月末（每月最后一天),SB-季度初，SE-季末，YB-年初,YH-半年,YE-年末 */
    @JsonSerialize(using = AfsEnumSerializer.class)
    @JsonDeserialize(using = AfsEnumDeserializer.class)
    @JSONField(serializeUsing = AfsEnumSerializer.class,deserializeUsing = AfsEnumDeserializer.class)
    private StepType stepType;
    /** 批量类型 DE-日终，DB-日初*/
    @JsonSerialize(using = AfsEnumSerializer.class)
    @JsonDeserialize(using = AfsEnumDeserializer.class)
    @JSONField(serializeUsing = AfsEnumSerializer.class,deserializeUsing = AfsEnumDeserializer.class)
    private BatchType batchType;
}
